;(function() {
    // 步骤3：创建echarts实例
    let myChart = echarts.init(document.querySelector('.box-r1'))

    // 步骤4：定义配置（指定图表的配置项和数据）
    let option = {
        angleAxis: {
          max: 2,
          startAngle: 30,
          splitLine: {
            show: false
          }
        },
        radiusAxis: {
          type: 'category',
          data: ['v', 'w', 'x', 'y', 'z'],
          z: 10
        },
        polar: {},
        series: [
          {
            type: 'bar',
            data: [4, 3, 2, 1, 0],
            coordinateSystem: 'polar',
            name: 'Without Round Cap',
            itemStyle: {
              borderColor: 'red',
              opacity: 0.8,
              borderWidth: 1
            }
          },
          {
            type: 'bar',
            data: [4, 3, 2, 1, 0],
            coordinateSystem: 'polar',
            name: 'With Round Cap',
            roundCap: true,
            itemStyle: {
              borderColor: 'green',
              opacity: 0.8,
              borderWidth: 1
            }
          }
        ],
        legend: {
          show: true,
          data: ['Without Round Cap', 'With Round Cap']
        }
      };

    // 步骤5：使用刚指定的配置项和数据显示图表
    myChart.setOption(option)

    // window.onresize = () => {
    //     myChart.resize()
    // }

    window.addEventListener('resize', () => {
        myChart.resize()
    })
})()